#ifndef _PIECE_H_
#define _PIECE_H_

#include <string>
#include <sstream>
#include "Resource.h"

using namespace std;

struct position
{
public:
	char x;
	int y;
public:
	position()
	{
	}

	position(char _x, int _y)
	{
		x = _x;
		y = _y;
	}
	string toString()
	{
		string s;
		stringstream ss;
		ss << x << y;
		ss >> s;
		return s;
	}
};

enum Color { WHITE, BLACK };
enum PieceType { TP_KING, TP_QUEEN, TP_BISHOP, TP_KNIGHT, TP_ROOK, TP_PAWN, TP_NULL };

class Piece
{
public:
	PieceType tp;
	Color col;
	Piece(){}
	Piece(Color c, PieceType t)
	{
		col = c;
		tp = t;
	}
};

class King:public Piece
{
private:
public:
	bool moved;
	King()
	{
	}

	King(Color c): Piece(c, PieceType::TP_KING)
	{
		moved = false;
	}
	//Rosada
};

class Queen: public Piece
{
private:

public:
	Queen(){ }

	Queen(Color c):	Piece(c, PieceType::TP_QUEEN)
	{
	};
};

class Bishop: public Piece
{
private:

public:
	Bishop(){}
	Bishop(Color c): Piece(c, PieceType::TP_BISHOP)
	{
	};
};

class Knight:public Piece
{
private:

public:
	Knight(){}
	Knight(Color c): Piece(c,PieceType::TP_KNIGHT)
	{
	};
};

class Rook:public Piece
{
private:
public:
	bool moved;
	Rook(){}
	Rook(Color c): Piece(c,PieceType::TP_ROOK)
	{
		moved = false;
	};
};

class Pawn:public Piece
{
private:
public:
	bool mv2sq;
	Pawn(){}
	Pawn(Color c): Piece(c,PieceType::TP_PAWN)
	{
		mv2sq = true;
	};
};

#endif